﻿<%@ Page Title="Flt. Not-paid Orders" Language="C#" Culture="auto" UICulture="auto" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FltNotPaidOrders.aspx.cs" Inherits="IFD2.FltNotPaidOrders" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <div class="container-fluid body-content" style="width:100%;">

        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" Text="Flight:" meta:resourcekey="Flight"></asp:Label>
                <asp:Label ID="lblAirline" runat="server"></asp:Label>
                <asp:TextBox ID="txtFltNo" runat="server" CssClass="form-control input-sm" Width="100%" MaxLength=6></asp:TextBox>
                <asp:Label ID="Label2" runat="server" Text="Date:" meta:resourcekey="Date"></asp:Label>
                <asp:TextBox ID="txtFltDate" runat="server" CssClass="form-control input-sm" Width="100%" MaxLength=15></asp:TextBox>
                <asp:CheckBox ID="chkIsGroup" runat="server" meta:resourcekey="GroupOrders" Text="Group" />
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>
            <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label>
        </div>

        <div class="col-sm-10 well well-sm">
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="section-2"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"  class="table-hover"
                            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" style="min-width:1300px;width:100%;">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:TemplateField HeaderText="bk_id" SortExpression="bk_id" meta:resourcekey="bk_id">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl='<%# "Order.aspx?pnr="+Eval("bk_id") %>'><%#Eval("bk_id") %></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="flight" SortExpression="flight" meta:resourcekey="flight1">
                                    <ItemTemplate>
                                        <%# Eval("airline")%> <%# Eval("flt_no") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CheckBoxField DataField="virtual" HeaderText="virtual" SortExpression="virtual" meta:resourcekey="virtual" />
                                <asp:TemplateField HeaderText="op_flight" SortExpression="op_flight" meta:resourcekey="op_flight">
                                    <ItemTemplate>
                                        <%# Eval("op_airline")%> <%# Eval("op_flt_no") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                
                                <asp:BoundField DataField="pnr_status" HeaderText="pnr_status" SortExpression="pnr_status"  meta:resourcekey="pnr_status" />
                                <asp:BoundField DataField="seg_total" HeaderText="seg_total" SortExpression="seg_total"  meta:resourcekey="seg_total" />
                                <asp:BoundField DataField="adt_count" HeaderText="adt_count" SortExpression="adt_count"  meta:resourcekey="adt_count" />
                                <asp:BoundField DataField="chd_count" HeaderText="chd_count" SortExpression="chd_count"  meta:resourcekey="chd_count" />
                                <asp:BoundField DataField="inf_count" HeaderText="inf_count" SortExpression="inf_count"  meta:resourcekey="inf_count" />
                                <asp:BoundField DataField="contact_man" HeaderText="contact_man" SortExpression="contact_man"  meta:resourcekey="contact_man" />
                                <asp:BoundField DataField="trip_sn" HeaderText="trip_sn" SortExpression="trip_sn"  meta:resourcekey="trip_sn" />
                                <asp:BoundField DataField="ori_airport" HeaderText="ori_airport" SortExpression="ori_airport"  meta:resourcekey="ori_airport" />
                                <asp:BoundField DataField="des_airport" HeaderText="des_airport" SortExpression="des_airport"  meta:resourcekey="des_airport" />
                                <asp:BoundField DataField="cabin" HeaderText="cabin" SortExpression="cabin"  meta:resourcekey="cabin" />
                                <asp:BoundField DataField="class" HeaderText="class" SortExpression="class"  meta:resourcekey="class" />
                                <asp:BoundField DataField="seats" HeaderText="seats" SortExpression="seats"  meta:resourcekey="seats" />
                                <asp:BoundField DataField="seat_status" HeaderText="seat_status" SortExpression="seat_status"  meta:resourcekey="seat_status" />
                                <asp:BoundField DataField="bk_time" HeaderText="bk_time" SortExpression="bk_time"  meta:resourcekey="bk_time" />
                                <asp:BoundField DataField="fare_code" HeaderText="fare_code" SortExpression="fare_code"  meta:resourcekey="fare_code" />
                                <asp:BoundField DataField="final_price" HeaderText="final_price" SortExpression="final_price"  meta:resourcekey="final_price" DataFormatString="{0:N}" />
                            </Columns>
                            <RowStyle BackColor="#EFF3FB" />
                            <EditRowStyle BackColor="#2461BF" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>
                    </div>
                </div>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                    SelectCommand="bll_flt_get_unpaid_bookings" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                    <SelectParameters>
                        <asp:SessionParameter Name="airline" SessionField="AIRLINE" Type="String" />
                        <asp:ControlParameter ControlID="txtFltNo" Name="flt_no" PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="txtFltDate" Name="flt_date" PropertyName="Text" Type="DateTime" />
                        <asp:ControlParameter ControlID="chkIsGroup" Name="is_group" PropertyName="Checked" Type="Boolean" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>
        </div>
    </div></form>

    <script src="JS/ScrollableGridPlugin.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var win_height = parseInt($(window).height());
            var tab_new_height= win_height-50-100;//菜单占50， 为便于操作留空100
            if ($('#<%=GridView1.ClientID %>').height()>tab_new_height)
                $('#<%=GridView1.ClientID %>').Scrollable({ ScrollHeight: tab_new_height });
        });
    </script>

</asp:Content>
